<?php

/**
 * This file is part of the Pagizer package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright   Copyright (c) 2010 Advisa (http://www.advisa.fr)
 * @author      Pagizer Core Team <team@pagizer.org>
 * @package     pagizer
 * @subpackage  medias
 */

class core_module_medias_0_1_1_Patch001 extends f_package_Patch
{
    public function patch()
    {
		$this->compileDocumentAndTables('medias', 'parameter');
        $parameters = f_document_Provider::getInstance()->loadDocuments("modules_medias/parameter")->retrieveDocuments();
        /* @var $parameter m_medias_documents_parameter */
        foreach($parameters as $parameter)
        {
            $parameter
                ->setCrop(1)
                ->save(false);
        }
	}
}